/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.frogs.manager;

import com.frogs.data.AbstractManager;
import com.frogs.exception.FrogsFindException;
import com.frogs.exception.FrogsMergeException;
import com.frogs.exception.FrogsPersistException;
import com.frogs.exception.FrogsRemoveException;
import com.frogs.model.Talla;
import java.util.List;
import javax.persistence.EntityManager;

/**
 *
 * @author gabrielbran
 */
public class ManagerTalla extends AbstractManager {

    public ManagerTalla() {
        super();
    }

    public Talla guardaTalla(Talla t) throws FrogsPersistException {
        return (Talla) super.persistObject(t);
    }

    public Talla actualizaTalla(Talla t) throws FrogsMergeException {
        return (Talla) super.mergeObject(t);
    }

    public void eliminaTalla(Talla t) throws FrogsRemoveException  {
        super.removeObject(t);
    }

    public List<Talla> getListaTallas() throws FrogsFindException {
        return (List<Talla>) super.getEntityList();
    }

    public Talla buscarCategoria(Integer tpk) throws Exception {
        return (Talla) super.findById(tpk);
    }

    @Override
    public EntityManager getEm() {
        return super.getEm();
    }

    @Override
    public String getEntityName() {
        return "Categoria";
    }
}
